import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.so.com')
time.sleep(2)

input= driver.find_element(By.ID,"input")
input.send_keys("python自动化测试")

time.sleep(2)
su = driver.find_element(By.ID,"search-button")
su.click()

time.sleep(2)
print(driver.title)

if "python" in driver.title:
    print('ok')
else:
    print('no')

time.sleep(2)
driver.quit()



